<?php

class Application_Form_Artist extends Zend_Form {

    public function init() {
        $this->setAction('/artist/validate')
                ->setMethod('post')
                ->setAttrib('id', 'artistForm')
                ->setDecorators(MusicEvent_Decorator_Decorator::Form());

        /* Artist */
        $this->addElement('text', 'artist', array(
            'decorators' => MusicEvent_Decorator_Decorator::SingleLineElement(),
            'validators' => array(
                array('NotEmpty', true, array(
                        'messages' => 'Insert an artist',
                ))),
            'filter' => 'StripTags',
            'required' => true,
            'attribs' => array(
                'class' => 'search'
            ),
        ));
    }

}

